package date;

import java.util.ArrayList;

/**
 * Created by Administrator on 2017/3/25.
 */
public class Shopcar{
    public ArrayList<Commodity> car=new ArrayList<Commodity>();

    public void add(Commodity c)
    {
        this.car.add(c);
    }

    public void del(Commodity c)
    {
        for(int i=0;i<this.car.size();i++)
        {
            if(car.get(i).equals(c))
            {
                car.remove(i);
                return;
            }
        }
    }


    @Override
    public String toString()
    {
        return this.car.toString();
    }

    public void search(){};
}
